package com.atguigu.gmall.item.config;


import java.util.UUID;
import java.util.concurrent.ThreadFactory;

/**
 * @author dyq
 * @description
 * @data 28/1/2022
 */
public class MyItemServiceThreadFactory implements ThreadFactory {
    @Override
    public Thread newThread(Runnable r) {
        Thread thread = new Thread(r);
        thread.setName(UUID.randomUUID().toString().substring(0,5));
        return thread;
    }
}
